package com.demo.hashSetdemo;


import com.alibaba.fastjson.JSONArray;
import org.eclipse.jetty.util.ajax.JSON;

import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;

public class Test2 {

    public static void main(String[] args) {
        People people1=new People();
        people1.setAge(1);
        people1.setName("kkk");

        People people2=new People();
        people2.setAge(15);
        people2.setName("aa");

        Student student=new Student();
        student.setAddress("河南");
        student.setName("崔军凯");

        Student student2=new Student();
        student2.setAddress("河南");
        student2.setName("崔军凯");
        Set<Student> set=new HashSet<>();
        set.add(student);
        set.add(student2);
        List<Object> list=new LinkedList<>();
        list.add(people2);
        list.add(people1);
        list.add(student);
        list.add(set);

        System.out.println("===list"+list);

        System.out.println("===set"+set);
        JSONArray jSONArray2=new JSONArray();

        jSONArray2.add(list);
        jSONArray2.add(set);

        System.out.println(jSONArray2);


    }
}
